#!/bin/bash

echo ""

while [ 1 ]
do
	#sig=`iwconfig 2>/dev/null | grep Signal | awk '{ print substr($4, length($4)-2) }'`
	#sig_pc=$(($sig+80))
	sig=`gsmctl -d /dev/ttyUSB$1 SIG | awk '{ print $2 }'`
	sig_pc=$(($sig))
	empty=$((75-$sig_pc))
	full="$(printf "%"$sig_pc"s" "")"
	printf "\rSignal: %02i  " "$sig_pc" 
	echo ""
#	echo -en "||"${full// /=}">"
#	printf "%"$empty"s||\n" ""
 	gsmctl -d /dev/ttyUSB$1 currop > /dev/null
	sleep 1
done

echo ""
